package com.ay.weixin.mail.domain;

import javax.mail.internet.AddressException;

import org.lizar.controller.loader.EventLoader;
import org.lizar.ioc.Cell;
import org.lizar.ioc.Container;

public class YongJinEmailNotify implements Cell{

	private MailBox	mailbox;
	
	@Override
	public void init_property() throws Exception {
		mailbox=Container.get(MailBox.class);
		
	}

	public void sendYongjinSubmitNotify(long wxproject_id,String name,String contact,String date,float amount,String emailAddress,String visitUrl,EventLoader el) throws AddressException{
		el.setAttr("title", "经纪人佣金提现申请通知");
		el.setAttr("name", name);
		el.setAttr("contact", contact);
		el.setAttr("date", date);
		el.setAttr("amount", amount);
		el.setAttr("visit_url", visitUrl);
		Email email=new Email(wxproject_id,"经纪人佣金提现申请通知-["+name+","+contact+","+amount+"]","爱有微信系统",el.getRealPath("/WEB-INF/email_template/yongjin_notify_template.vm"),emailAddress,el);
		mailbox.sendMail(email);
	}
	
}
